package com.gainloop.Api.Entity;

import java.util.Date;

import com.gainloop.Api.ApiException;
import com.google.gson.annotations.SerializedName;

public class Help extends EntityAbstract {
	
	@SerializedName("id")
	private long _id;

	@SerializedName("wishId")
	private long _wishId;

	@SerializedName("wishUserId")
	private long _wishUserId;

	@SerializedName("userId")
	private long _userId;

	@SerializedName("createTime")
	private long _createTime;
		
	@SerializedName("content")
	private String _content;

	@SerializedName("lastChangeTime")
	private long _lastChangeTime;

	@SerializedName("isResolved")
	private boolean _isResolved;

	@SerializedName("isIgnored")
	private boolean _isIgnored;
	


	public long getId()
	{
		return this._id;
	}

	public long getWishId()
	{
		return this._wishId;
	}
	
	public void setWishId(long wishId)
	{
		if(wishId < 0) {
			throw new ApiException("wishId must be unsigned");
		} else if(wishId == 0) {
			throw new ApiException("wishId must be set");
		}
		this._wishId = wishId;
	}

	public long getWishUserId()
	{
		return this._wishUserId;
	}
	
	public long getUserId()
	{
		return this._userId;
	}
	
	public void setUserId(long userId)
	{
		if(userId < 0) {
			throw new ApiException("userId must be unsigned");
		} else if(userId == 0) {
			throw new ApiException("userId must be set");
		}
		this._userId = userId;
	}
	
	public Date getCreateTime()
	{
		return new Date(this._createTime * 1000);
	}
	
	public String getContent()
	{
		return this._content;
	}
	
	public void setContent(String content)
	{
		this._content = content;
	}
	
	public Date getLastChangeTime()
	{
		return new Date(this._lastChangeTime * 1000);
	}
	
	public boolean isResolved()
	{
		return this._isResolved;
	}
	
	public boolean isIgnored()
	{
		return this._isIgnored;
	}
	
	public String toString()
	{
		return "Help[" + this._id + "]";
	}
}
